package com.example.mybatisplus.model.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 学生初访预约信息
 * </p>
 *
 * @author cft
 * @since 2022-06-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("pcs_first_appointment")
@ApiModel(value="FirstAppointment对象", description="学生初访预约信息")
public class FirstAppointment extends Model<FirstAppointment> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "f_apo_id", type = IdType.AUTO)
    private Long fApoId;

    @TableField("stu_id")
    private Long stuId;

    @TableField("self_em_staus")
    private String selfEmStaus;
    @TableField("qur_result")
    private Long qurResult;

    @TableField("apo_topic")
    private String apoTopic;

    @TableField("apo_status")
    private String apoStatus;

    @TableField("is_therapy_exp")
    private Integer isTherapyExp;

    @TableField("self_description")
    private String selfDescription;

    @TableField("f_apo_result")
    private String fApoResult;

    @TableField("submited_time")
    public LocalDateTime submitedTime;


    @Override
    protected Serializable pkVal() {
        return this.fApoId;
    }
    //记录填写时间
    public void  recordTime(){
        submitedTime=submitedTime.now();
    }
    //检查是否填写完整
    public boolean checkInfo(){
        if(this.stuId==null||this.selfEmStaus==null||this.apoTopic==null){
            return true;
        }else{
            return false;
        }
    }



}
